package com.itheima.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <h1>评论vo</h1>
 *
 * @author <a href="515857087@qq.com">叶世铭</a>
 * @since 2022/10/21
 */
@Data
@ApiModel(value = "评论Vo")
public class CommentVo implements Serializable {

    private static final long serialVersionUID = -6787888537506342356L;
    /**
     * 评论id
     */
    private Integer id;

    /**
     * 信息id
     */
    @ApiModelProperty(value = "评论对应的信息id",required = true)
    private Integer messageId;

    /**
     * 评论的内容
     */
    @ApiModelProperty(value = "评论的内容",required = true)
    private String content;

    /**
     * 父级评论，0为第一条评论
     */
    @ApiModelProperty(value = "当前评论的父级评论，为0则是对信息的评论")
    private Integer parentCommentId;

    /**
     * 评论者的id
     */
    @ApiModelProperty(value = "评论者的id")
    private String userId;

    /**
     * 是不是叶子评论
     */
    @ApiModelProperty(value = "叶子评论标识")
    private Integer isChild;

    /**
     * 时间
     */
    @ApiModelProperty(value = "时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    /**
     * 评论的子评论集
     */
    @ApiModelProperty(value = "评论的子评论集")
    List<CommentVo>  commentVos;
}
